from django.db import models
from django.contrib import admin

# Create your models here.
class HostInfo(models.Model):
    HostName = models.CharField(max_length=30)
    Domain = models.CharField(max_length=30)
    PriIP = models.CharField(max_length=15)
    PubIP = models.CharField(max_length=15, default='Null')
    InterfacePri = models.CharField(max_length=15, default='Null')
    InterfacePub = models.CharField(max_length=15, default='Null')
    CPU = models.CharField(max_length=30)
    DISK = models.CharField(max_length=30)
    MEM = models.CharField(max_length=30)
    OS = models.CharField(max_length=30)
    Role = models.CharField(max_length=20)
    Project = models.CharField(max_length=20, default='Null')
    Zone = models.CharField(max_length=20, default='Null')
    CreateTime = models.DateTimeField()

class HostInfoAdmin(admin.ModelAdmin):
    list_display = ('HostName', 'Domain', 'OS', 'PriIP', 'PubIP', 'CreateTime')

admin.site.register(HostInfo, HostInfoAdmin)